#pragma once
#include <d3d11.h>
#include <DirectXMath.h>
using namespace DirectX;

struct VS_CONSTANT_BUFFER
{
	XMFLOAT4X4 world;
	XMFLOAT4X4 view;
	XMFLOAT4X4 projection;
};



struct DIR_LIGHT_BUFFER
{
	XMFLOAT4 lightDirection;
	XMFLOAT4 dlColor;
};
struct POINT_LIGHT_BUFFER
{
	
	XMFLOAT4 plPos;
	XMFLOAT4 plColor;

};
struct SPOT_LIGHT_BUFFER
{
	XMFLOAT4 slPos;
	XMFLOAT4 slColor;
	XMFLOAT4 coneDir;

};

class ShaderGroup
{
public:



	ShaderGroup();
	~ShaderGroup(); 

	HRESULT InitializeShaders(ID3D11Device* device, const void* PixelShaderByteCode, UINT psByte, const void* VertexShaderByteCode, UINT vsByte, const void* GeometryShaderByteCode = 0, UINT gsByteCount = 0);
	void ShutDown();
	HRESULT SetVShaderInfo(ID3D11DeviceContext* pContext, VS_CONSTANT_BUFFER* vsbufferInfo);
	HRESULT SetPShaderInfo(ID3D11DeviceContext* pContext, ID3D11ShaderResourceView* textureResource, DIR_LIGHT_BUFFER* dlbufferInfo, POINT_LIGHT_BUFFER* plbufferInfo, SPOT_LIGHT_BUFFER* slbufferInfo);
	HRESULT SetGShaderInfo(ID3D11DeviceContext* pContext, VS_CONSTANT_BUFFER* gsbufferInfo);

	void AddShadersToPipeline(ID3D11DeviceContext* pContext);

private:


	ID3D11VertexShader* m_pVertexShader;
	ID3D11PixelShader* m_pPixelShader;
	ID3D11GeometryShader* m_pGeometryShader;
	ID3D11InputLayout* m_pInputLayout;
	ID3D11Buffer* m_pVSConstantBuffer;
	ID3D11Buffer* m_pGSConstantBuffer;

	ID3D11Buffer* m_pPSConstantBuffer[3];

	ID3D11SamplerState* m_pSampleState;
};

